<layout name="page" />
<block name="content">
	{:widget('page_header/simple',array('name'=>'新建会议事项'))}
	<form method='post' id="form_data" name="form_data" enctype="multipart/form-data"  >
		<input type="hidden" id="ajax" name="ajax" value="0">
		<input type="hidden" id="opmode" name="opmode" value="add">
		<input type="hidden" name="actor" id="actor">
		<input type="hidden" id="actor_user_id" name="actor_user_id" value="">

		
			<label class="input-label" for="name">标题*：</label>
			
				<input class="input" type="text" id="name" name="name" check="required" info="请输入标题">
			</div>
		</div>

		
			<label class="input-label" for="name">会议开始时间*：</label>
			
				<input type="text" id="LAY_demorange_s" name="start_time" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" readonly="readonly" class="input input-date-time" check="required" info="请输入开始日期">
			</div>
		</div>

		
			<label class="input-label" for="name">会议结束时间*：</label>
			
				<input type="text" id="LAY_demorange_s" name="end_time" readonly="readonly"
				class="input" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" check="required" info="请输入结束日期" readonly="readonly">
			</div>
		</div>

		
			<label class="input-label" for="meeting_room">会议室：</label>
			
				<select  class="input" name="meeting_room" id="meeting_room">
					<option  value="">请选择会议室</option>
					<volist name='room_list' id='room'>
						<option value="{$room.id}">{$room.name}
							<notempty name="room.addr">
								[{$room.addr}]
							</notempty>
							<notempty name="room.num">
								[{$room.num}人]
							</notempty>
						</option>
					</foreach>
				</select>
			</div>
		</div>
		
			<label class="input-label" for="tip_name">会议前提醒时间*：</label>
			
				<input class="input" type="text" id="tip_time" name="tip_time" check="required" info="输入提醒时间">
			</div>
		</div>

		<div class=""></div>
		
			<label class="input-label" for="location">参与人员：</label>
			
				<div id="actor_wrap" class="inputbox">
					<a class="pull-right btn btn-link text-center" id="popup_actor"><i class="fa fa-user"></i> </a>
					<div class="wrap" >
						<span class="address_list"></span>
						<span class="text" >
							<input class="letter" type="text"  >
						</span>
					</div>
					<div class="search dropdown ">
						<ul class="dropdown-menu"></ul>
					</div>
				</div>
			</div>
		</div>
		
			
				<textarea  class="editor" id="content" name="content" style="width:100%;height:300px;"></textarea>
			</div>
		</div>
		
			<label class="input-label" >附件：</label>
			
				{:widget('file_upload/add')}
			</div>
		</div>
		
			
				<a class="btn btn-normal" onclick="save()">保存</a>
				<a  class="btn btn-return" onclick="go_return_url();">取消</a>
			</div>
		</div>
	</form>
</block>
<block name="js">
	<script type="text/javascript">
		
		layui.use('global', function() {
			var $ = layui.jquery;
			
			$("#popup_actor").on('click',function(){
				winopen("{:url('popup/actor')}", 560, 470);
			});
			$("#btn_save").on('click',function(){
				$("#actor").val("");
				$("#actor_wrap span.address_list span").each(function() {
					$("#actor").val($("#actor").val() + $(this).find("b").text() + '|' + $(this).attr("data") + ";");
				});
				$("#actor_user_id").val("");
				$("#actor_wrap span.address_list span").each(function() {
					$("#actor_user_id").val($("#actor_user_id").val() + $(this).attr("data") + ",");
				});
				send_form("form_data", "{:url('save')}");
			});


			$(document).on("click", ".inputbox .address_list a.del", function() {
				$(this).parent().parent().remove();
			});

			$(document).ready(function() {
				$("#basic_slider").noUiSlider({
					start : 3,
					step : 1,
					range : {
						'min' : 1,
						'max' : 5,
					},
				});
				$("#basic_slider").on('change', function() {
					$("div.slider_box .noUi-base").css("background-color", schedule_bg($(this).val()));
					$("#priority").val($(this).val());
				});
				$("div.slider_box .noUi-base").css("background-color", schedule_bg(3));
			});
		});

	</script>
</block>